﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Course2
{
    /// <summary>
    /// 学习List,ArrayList,LikedList,HashSet,Dictionary
    /// 学习接口和继承关系
    /// </summary>
    internal class Example3
    {
        public void ArrayListTest()
        {
            var list = new ArrayList<int>();
            list.Add(1);
            list.Add(1);
        }
        public void LinkedListTest()
        {
            var list = new LinkedList<int>();
            list.AddLast(1);
            list.AddLast(1);
        }
        public void HashSetTest()
        {
            var list = new HashSet<int>();
            list.Add(1);
            list.Add(1);
        }
        public void DicitonaryTest()
        {
            var list = new Dictionary<string, object>();
            list.Add("a", new Student());
            list.Add("b", new { Age = 20});//匿名类型
        }
    }

    public class Student
    {
    }
}
